 library(glue)
 library(httpuv)
 library(openssl)
 library(twitteR)
 library(ROAuth)
 library(rtweet)
 library(dplyr)
 library(rlang)
 library(base64enc)
 library(devtools)
 library(rjson)
 options(java.parameters = "-Xmx24000m")
 
 ## Twitter Authentication
 ## store api keys
 api_key <- ""
 api_secret_key <- ""
 access_token <- ""
 access_token_secret <- ""
 
 ## authenticate via web browser
 token <- create_token(
   app = "",
   consumer_key = api_key,
   consumer_secret = api_secret_key,
   access_token = access_token,
   access_secret = access_token_secret,
   set_renv = FALSE)
 
 setup_twitter_oauth(api_key, api_secret_key, access_token, access_token_secret)

 #Procura Tweets por uma Busca Aberta Até 18000
 corona_nas_periferias <- search_tweets('#', n=18000, retryonratelimit = TRUE, lang="pt")
 variaveis <- c("user_id", "status_id", "created_at", "screen_name", "text", "source", "reply_to_status_id", "reply_to_user_id", "reply_to_screen_name", "hashtags", "urls_url", "mentions_user_id", "mentions_screen_name")
 new_data <- new_data[variaveis]
 new_data [] <- lapply(new_data, as.character)